3.552 \(\int \frac{x^{-1+n}}{a+b x^n+c x^{2 n}} \, dx\)

Optimal. Leaf size=39 \[ -\frac{2 \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{n \sqrt{b^2-4 a c}} \]

[Out]

(-2*ArcTanh[(b + 2*c*x^n)/Sqrt[b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0329309, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {1352, 618, 206} \[ -\frac{2 \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{n \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]

Int[x^(-1 + n)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(-2*ArcTanh[(b + 2*c*x^n)/Sqrt[b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*n)

Rule 1352

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[(a + b*x +
 c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, b, c, m, n, p}, x] && EqQ[n2, 2*n] && EqQ[Simplify[m - n + 1], 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{x^{-1+n}}{a+b x^n+c x^{2 n}} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^n\right )}{n}\\ &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^n\right )}{n}\\ &=-\frac{2 \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c} n}\\ \end{align*}

Mathematica [A]  time = 0.0620931, size = 39, normalized size = 1. \[ -\frac{2 \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{n \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 + n)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(-2*ArcTanh[(b + 2*c*x^n)/Sqrt[b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*n)

________________________________________________________________________________________

Maple [B]  time = 0.046, size = 113, normalized size = 2.9 \begin{align*} -{\frac{1}{n}\ln \left ({x}^{n}+{\frac{1}{2\,c} \left ({b}^{2}-4\,ac+b\sqrt{-4\,ac+{b}^{2}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}}+{\frac{1}{n}\ln \left ({x}^{n}+{\frac{1}{2\,c} \left ( b\sqrt{-4\,ac+{b}^{2}}+4\,ac-{b}^{2} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1+n)/(a+b*x^n+c*x^(2*n)),x)

[Out]

-1/(-4*a*c+b^2)^(1/2)/n*ln(x^n+1/2*(b^2-4*a*c+b*(-4*a*c+b^2)^(1/2))/c/(-4*a*c+b^2)^(1/2))+1/(-4*a*c+b^2)^(1/2)
/n*ln(x^n+1/2*(b*(-4*a*c+b^2)^(1/2)+4*a*c-b^2)/c/(-4*a*c+b^2)^(1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{n - 1}}{c x^{2 \, n} + b x^{n} + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

integrate(x^(n - 1)/(c*x^(2*n) + b*x^n + a), x)

________________________________________________________________________________________

Fricas [B]  time = 1.57392, size = 351, normalized size = 9. \begin{align*} \left [\frac{\log \left (\frac{2 \, c^{2} x^{2 \, n} + b^{2} - 2 \, a c + 2 \,{\left (b c - \sqrt{b^{2} - 4 \, a c} c\right )} x^{n} - \sqrt{b^{2} - 4 \, a c} b}{c x^{2 \, n} + b x^{n} + a}\right )}{\sqrt{b^{2} - 4 \, a c} n}, -\frac{2 \, \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{2 \, \sqrt{-b^{2} + 4 \, a c} c x^{n} + \sqrt{-b^{2} + 4 \, a c} b}{b^{2} - 4 \, a c}\right )}{{\left (b^{2} - 4 \, a c\right )} n}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

[log((2*c^2*x^(2*n) + b^2 - 2*a*c + 2*(b*c - sqrt(b^2 - 4*a*c)*c)*x^n - sqrt(b^2 - 4*a*c)*b)/(c*x^(2*n) + b*x^
n + a))/(sqrt(b^2 - 4*a*c)*n), -2*sqrt(-b^2 + 4*a*c)*arctan(-(2*sqrt(-b^2 + 4*a*c)*c*x^n + sqrt(-b^2 + 4*a*c)*
b)/(b^2 - 4*a*c))/((b^2 - 4*a*c)*n)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+n)/(a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.09947, size = 53, normalized size = 1.36 \begin{align*} \frac{2 \, \arctan \left (\frac{2 \, c x^{n} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

2*arctan((2*c*x^n + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*n)